package com.stylefeng.guns.order.dao;

import com.baomidou.mybatisplus.plugins.Page;
import com.stylefeng.guns.api.order.vo.OrderVO;
import com.stylefeng.guns.order.model.MoocOrder2018T;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 订单信息表 Mapper 接口
 * </p>
 *
 * @author dengwubo
 * @since 2020-02-24
 */
public interface MoocOrder2018TMapper extends BaseMapper<MoocOrder2018T> {
    /**
     * 获取播放场次对应的坐席json文件
     * @param fieldId
     * @return
     */
    String getSeatsByFieldId(@Param("fieldId")String fieldId);

    /**
     * 获取订单详情
     * @param orderId
     * @return
     */
    OrderVO getOrderInfoById(@Param("orderId")String orderId);

    /**
     * 根据用户ID 获取订单详情
     * @param userId
     * @return
     */
    List<OrderVO> getOrdersByUserId(@Param("userId")Integer userId , Page<OrderVO> page);

    /**
     * 获取该场次已售出的所有票
     * @param fieldId
     * @return
     */
    String getSoldSeatsByFieldId(@Param("fieldId")Integer fieldId);
}
